<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Model m_album
 *
 * @author luubk
 * @since Nov 1, 2012 - 6:38:51 AM
 */
class M_album extends MY_Model
{

    function __construct()
    {
        $this->table = 'album';

        parent::__construct();
    }

    function _join()
    {
        $this->db->join('album_category_relation', 'album.album_id = album_category_relation.album_id');
        $this->db->join('album_category', 'album_category.cate_id = album_category_relation.cate_id');

        parent::_join();
    }

    function multi_select($where = array(), $order = FALSE, $limit = FALSE, $offset = 0)
    {
        $this->db->group_by('album.album_id');
        return parent::multi_select($where, $order, $limit, $offset);
    }

}

/** 
 * End file m_album
 */
